package com.jixiang.apiFeignt.clients;

import com.jixiang.model.common.dtos.ResponseResult;
import com.jixiang.model.goods.dtos.CartDtos;
import com.jixiang.model.goods.dtos.GoodsDto;
import com.jixiang.model.order.dtos.OrderDtos;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("jixiang-pro-goods")
public interface GoodsClient {

    @PostMapping("goodsApi/goodsInventory")
    public String goodsInventory(@SpringQueryMap OrderDtos orderDtos);
//    public String goodsInventory(@RequestBody(required = false) List<CartDtos> cartDtosList);

    @GetMapping("/goodsInfo/appGetGoodsInfoById")
    public ResponseResult appGetGoodsInfoById(@RequestParam(required = true,value = "id")String id);

    @GetMapping("/goodsInfo/getGoodsInfoById")
    public GoodsDto getGoodsInfoById(@RequestParam(required = true,value = "id")String id);
}
